package com.ruoyi.system.domain;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 群聊消息记录对象 group_chat_message
 *
 * @author ruoyi
 * @date 2025-11-02
 */
public class GroupChatMessage extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 消息ID */
    private Long id;

    /** 群ID */
    @Excel(name = "群ID")
    private String groupId;

    /** 发送者ID */
    @Excel(name = "发送者ID")
    private String senderId;

    /** 发送者昵称 */
    @Excel(name = "发送者昵称")
    private String senderName;

    /** 发送者头像 */
    @Excel(name = "发送者头像")
    private String senderAvatar;

    /** 消息内容 */
    @Excel(name = "消息内容")
    private String content;

    /** 发送时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "发送时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date sendTime;

    /** 是否已读（0未读，1已读） */
    @Excel(name = "是否已读", readConverterExp = "0=未读，1已读")
    private Long isRead;

    public void setId(Long id)
    {
        this.id = id;
    }

    public Long getId()
    {
        return id;
    }

    public void setGroupId(String groupId)
    {
        this.groupId = groupId;
    }

    public String getGroupId()
    {
        return groupId;
    }

    public void setSenderId(String senderId)
    {
        this.senderId = senderId;
    }

    public String getSenderId()
    {
        return senderId;
    }

    public void setSenderName(String senderName)
    {
        this.senderName = senderName;
    }

    public String getSenderName()
    {
        return senderName;
    }

    public void setSenderAvatar(String senderAvatar)
    {
        this.senderAvatar = senderAvatar;
    }

    public String getSenderAvatar()
    {
        return senderAvatar;
    }

    public void setContent(String content)
    {
        this.content = content;
    }

    public String getContent()
    {
        return content;
    }

    public void setSendTime(Date sendTime)
    {
        this.sendTime = sendTime;
    }

    public Date getSendTime()
    {
        return sendTime;
    }

    public void setIsRead(Long isRead)
    {
        this.isRead = isRead;
    }

    public Long getIsRead()
    {
        return isRead;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("groupId", getGroupId())
                .append("senderId", getSenderId())
                .append("senderName", getSenderName())
                .append("senderAvatar", getSenderAvatar())
                .append("content", getContent())
                .append("sendTime", getSendTime())
                .append("isRead", getIsRead())
                .toString();
    }
}
